FROM tomcat

ENV APP_HOME /usr/local/tomcat
ENV APP xwl-web
ENV LANG C.UTF-8

WORKDIR $APP_HOME

#update system timezone
RUN ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime

#update application timezone
RUN echo "Asia/Shanghai" > /etc/timezone

ADD server.xml $APP_HOME/conf/server.xml
ADD target/xwl-web.war $APP_HOME/xwl-web.war

RUN unzip $APP_HOME/xwl-web.war -d $APP_HOME/xwl-web

ADD run.sh $APP_HOME/run.sh
RUN chmod +x run.sh

CMD ["sh","-c","./run.sh"]